package com.chhuang.huaao.po;

import java.io.Serializable;
import java.util.Date;
import com.chhuang.core.model.AbstractPersistentModel;
import com.chhuang.core.validation.ValidGroupSave;
import com.chhuang.core.validation.ValidGroupUpdate;
import com.sun.xml.bind.CycleRecoverable;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import com.alibaba.fastjson.annotation.JSONField;

/**
* HaCustomer Model
* @author ChHuang
* @date Sun Apr 16 08:43:49 CST 2017
*/
public class HaCustomer extends AbstractPersistentModel implements CycleRecoverable{
	private static final long serialVersionUID = 7173744721250017290L;
	@NotNull(message="{HaCustomer.customerId.NotNull}",groups={ValidGroupUpdate.class})
	@Size(max=32,message="{HaCustomer.customerId.Size}",groups={ValidGroupSave.class})
	private String customerId;
	public String getCustomerId(){
		return customerId;
	}
	public void setCustomerId(String customerId){
		this.customerId=customerId;
	}
	@NotNull(message="{HaCustomer.customerAccount.NotNull}",groups={ValidGroupUpdate.class,ValidGroupSave.class})
	@Size(max=255,message="{HaCustomer.customerAccount.Size}",groups={ValidGroupSave.class})
	private String customerAccount;
	public String getCustomerAccount(){
		return customerAccount;
	}
	public void setCustomerAccount(String customerAccount){
		this.customerAccount=customerAccount;
	}
	@NotNull(message="{HaCustomer.customerPhone.NotNull}",groups={ValidGroupUpdate.class,ValidGroupSave.class})
	@Size(max=16,message="{HaCustomer.customerPhone.Size}",groups={ValidGroupSave.class})
	private String customerPhone;
	public String getCustomerPhone(){
		return customerPhone;
	}
	public void setCustomerPhone(String customerPhone){
		this.customerPhone=customerPhone;
	}
	@NotNull(message="{HaCustomer.customerPassword.NotNull}",groups={ValidGroupUpdate.class,ValidGroupSave.class})
	@Size(max=32,message="{HaCustomer.customerPassword.Size}",groups={ValidGroupSave.class})
	private String customerPassword;
	public String getCustomerPassword(){
		return customerPassword;
	}
	public void setCustomerPassword(String customerPassword){
		this.customerPassword=customerPassword;
	}
	@Size(max=255,message="{HaCustomer.customerName.Size}",groups={ValidGroupSave.class})
	private String customerName;
	public String getCustomerName(){
		return customerName;
	}
	public void setCustomerName(String customerName){
		this.customerName=customerName;
	}
	private Integer customerGender;
	public Integer getCustomerGender(){
		return customerGender;
	}
	public void setCustomerGender(Integer customerGender){
		this.customerGender=customerGender;
	}
	@Size(max=255,message="{HaCustomer.customerCompany.Size}",groups={ValidGroupSave.class})
	private String customerCompany;
	public String getCustomerCompany(){
		return customerCompany;
	}
	public void setCustomerCompany(String customerCompany){
		this.customerCompany=customerCompany;
	}
	@Size(max=255,message="{HaCustomer.customerPhoto.Size}",groups={ValidGroupSave.class})
	private String customerPhoto;
	public String getCustomerPhoto(){
		return customerPhoto;
	}
	public void setCustomerPhoto(String customerPhoto){
		this.customerPhoto=customerPhoto;
	}
	@Size(max=255,message="{HaCustomer.deviceSystem.Size}",groups={ValidGroupSave.class})
	private String deviceSystem;
	public String getDeviceSystem(){
		return deviceSystem;
	}
	public void setDeviceSystem(String deviceSystem){
		this.deviceSystem=deviceSystem;
	}
	@Size(max=255,message="{HaCustomer.deviceModel.Size}",groups={ValidGroupSave.class})
	private String deviceModel;
	public String getDeviceModel(){
		return deviceModel;
	}
	public void setDeviceModel(String deviceModel){
		this.deviceModel=deviceModel;
	}
	@Size(max=255,message="{HaCustomer.deviceVendor.Size}",groups={ValidGroupSave.class})
	private String deviceVendor;
	public String getDeviceVendor(){
		return deviceVendor;
	}
	public void setDeviceVendor(String deviceVendor){
		this.deviceVendor=deviceVendor;
	}
	@Size(max=255,message="{HaCustomer.deviceUuid.Size}",groups={ValidGroupSave.class})
	private String deviceUuid;
	public String getDeviceUuid(){
		return deviceUuid;
	}
	public void setDeviceUuid(String deviceUuid){
		this.deviceUuid=deviceUuid;
	}
	@Size(max=255,message="{HaCustomer.clientId.Size}",groups={ValidGroupSave.class})
	private String clientId;
	public String getClientId(){
		return clientId;
	}
	public void setClientId(String clientId){
		this.clientId=clientId;
	}
	@Size(max=255,message="{HaCustomer.clientVersion.Size}",groups={ValidGroupSave.class})
	private String clientVersion;
	public String getClientVersion(){
		return clientVersion;
	}
	public void setClientVersion(String clientVersion){
		this.clientVersion=clientVersion;
	}
	@Size(max=255,message="{HaCustomer.lastLoginAddress.Size}",groups={ValidGroupSave.class})
	private String lastLoginAddress;
	public String getLastLoginAddress(){
		return lastLoginAddress;
	}
	public void setLastLoginAddress(String lastLoginAddress){
		this.lastLoginAddress=lastLoginAddress;
	}
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date lastLoginTime;
	public Date getLastLoginTime(){
		return lastLoginTime;
	}
	public void setLastLoginTime(Date lastLoginTime){
		this.lastLoginTime=lastLoginTime;
	}
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	public Date getCreateTime(){
		return createTime;
	}
	public void setCreateTime(Date createTime){
		this.createTime=createTime;
	}
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date modifyTime;
	public Date getModifyTime(){
		return modifyTime;
	}
	public void setModifyTime(Date modifyTime){
		this.modifyTime=modifyTime;
	}
	private Boolean locked;
	public Boolean getLocked(){
		return locked;
	}
	public void setLocked(Boolean locked){
		this.locked=locked;
	}
	@Override
	public Serializable getId() {
		return getCustomerId();
	}
	@Override
	public void setId(Serializable id) {
		setCustomerId((String)id);
	}
	@Override
	public Object onCycleDetected(Context arg0) {
		HaCustomer temp=new HaCustomer();
		temp.setCustomerId(customerId);
		return temp;
	}
	@Override
	public String toString() {
		return "HaCustomer [customerId="+customerId+",customerAccount="+customerAccount+",customerPhone="+customerPhone+",customerPassword="+customerPassword+",customerName="+customerName+",customerGender="+customerGender+",customerCompany="+customerCompany+",customerPhoto="+customerPhoto+",deviceSystem="+deviceSystem+",deviceModel="+deviceModel+",deviceVendor="+deviceVendor+",deviceUuid="+deviceUuid+",clientId="+clientId+",clientVersion="+clientVersion+",lastLoginAddress="+lastLoginAddress+",lastLoginTime="+lastLoginTime+",createTime="+createTime+",modifyTime="+modifyTime+",locked="+locked+"]";
	}
}